import time
from public.action import *
from public.business import *
from public.testData import *
from public.tools import *

testCase = "DBshop015_添加侧边测试"
# "1.点击“添加侧边设置”按钮，显示名称“网站很好看”，排序255，点击“保存侧边显示信息”。
firefox = openBrowser(urlAdmin)
DBshopLoginAdmin(firefox)
DBshopEnterMenu3(firefox, "商品管理", "管理分类","前台侧边设置")
firefox.find_element_by_link_text("添加侧边显示").click()
firefox.find_element_by_id("frontside_name").send_keys("网站很好看")
firefox.find_element_by_xpath("//button").click()
# 2.保存成功信息";添加成功侧边设置
try:
    firefox.find_element_by_xpath("//td[contains(.,'网站很好看')]")
    writeLog("%s 测试通过" % testCase)
except:
    writeLog("%s 测试失败" % testCase)
    getPhoto(firefox)
firefox.quit()

